<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="jt.classic.system.ISystem" %>
<%@ page import="jt.classic.system.user.IUser" %>
<%@ page import="jt.classic.app.info.AInfoDirectory" %>
<%@ page import="java.io.*"%>
<%
   String context = jt.classic.system.ISystem.getContextPath();
   
   IUser user = ISystem.getSessionUser(request);
   
   AInfoDirectory adirec = (AInfoDirectory)request.getAttribute("adirec");
   
   String action = StringTool.checkString(request.getParameter("action"));
   
   String title = (adirec.isroot() || adirec.iparentid().equals("0"))?"专题":"栏目";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%=title%>栏目预览</title>
</head>
<jsp:include page="../head.jsp"></jsp:include>
<script>
   function handleView(id,tp){
      var url = context + "/app/info.do?method=viewimg&id=" + id + "&type=" + tp;
      xwin(this,url,false,"图片预览");
   }
   
   function handleFace(id,key){
      //var url = context + "/app/info.do?method=face2directory&id=" + id;
      var url = context + "/app/portaltest.do?method=testtheme&key=" + key;
      xwin(this,url,false,"发布预览");
   }
   
   <%if(action.equals("true")){%>
       parent.document.frames["left"].location.reload();
   <%}%>
</script>
<body>
<form id="form1" name="form1" method="post" action="" enctype="multipart/form-data">
<input type="hidden" name="idid" value="<%=adirec.id()%>">
<fieldset id="lanmu" style="width:600px;margin:10px;">
<legend><%=title%>基本信息</legend>
<label for="idname"><%=title%>名称  : </label>
    <%if(!adirec.isroot()){%>
    <input type="text" id="idname" name="idname" value="<%=adirec.iname()%>" style="width:410px;" readonly/>
    <%}else{%>
    <%=adirec.iname()%>
    <%}%>
<br/>
<label for="idkey">唯一标识 : </label>
    <%if(!adirec.isroot()){%>
    <input type="text" id="idkey" name="idkey" value="<%=adirec.ikey()%>" style="width:410px;" readonly/>
    <%}else{%>
    <%=adirec.ikey()%>
    <%}%>
<br/>
  <%if(adirec.iparentid().equals("0")){%>
  <label for="idtemp">显示模板 : </label>
    <input type="text" id="idtemp" name="idtemp" value="<%=adirec.getResource().get("ID_TEMP")%>" style="width:410px;" readonly/>
  <br/>
  <%}%>
  
   <%
    if(adirec.getResource().get("ID_LABELIMG") != null && ((byte[])adirec.getResource().get("ID_LABELIMG")).length > 0){%>
    <label for="idlabelimg">标识图片 : </label>
    <a href="<%=adirec.getResource().get("ID_LABELIMGURL")%>" target="_blank">查看</a>
    <br/>
  <%}%>
  
  <%if(adirec.getResource().get("ID_TITLEIMG") != null && ((byte[])adirec.getResource().get("ID_TITLEIMG")).length > 0){%>
  <label for="idtitleimg">标题图片 : </label>
    <a href="<%=adirec.getResource().get("ID_TITLEIMGURL")%>" target="_blank">查看</a>
   <br/>  
  <%}%>
  
  <label for="idmemo"><%=title%>说明 : </label>
    <%if(!adirec.isroot()){%>
    <textarea id="idmemo" name="idmemo" readonly><%=adirec.imemo()%></textarea>
    <%}else{%>
    <%=adirec.imemo()%>
    <%}%>
 <br/>
</fieldset>
</form>
</body>
</html>